#pragma once

#include <ClockEngine.h>

class GameMesh
{
protected:
	clkCore* m_core;
	clkMeshInfo m_mesh;
	clkColor m_color;

	V3DF m_position;
	V3DF m_rotation;
	V3DF m_scaling;
	V3DF m_center;

	V3DF* m_attPos;
	V3DF  m_attPosOff;
	V3DF* m_attCen;
	V3DF  m_attCenOff;
public:
	GameMesh();
	~GameMesh();

	void init(
		char* a_meshPath,
		clkColor a_color = 1,
		V3DF a_position = 0,
		V3DF a_rotation = 0,
		V3DF a_scaling = 1,
		V3DF a_center = 0);
	void shut();
	void draw(
		int a_rotateType = CLK_ROTATE_DEGREE,
		V3DF a_rotateLook = V3DF(0,0,0));

	void attachPosition(V3DF* a_attPos, V3DF m_offset)
	{m_attPos=a_attPos;m_attPosOff=m_offset;}
	void attachCenter(V3DF* a_attCen, V3DF m_offset)
	{m_attCen=a_attCen;m_attCenOff=m_offset;}
};